#!/usr/bin/env python
# -*- coding:UTF-8 -*-

"""
运行入口
"""
# from scrapy.crawler import CrawlerProcess
# from scrapy.utils.project import get_project_settings


# def main():
#     process = CrawlerProcess(get_project_settings())
#     process.crawl('douban_spider')
#     process.start()


from scrapy import cmdline


def main():
    """
    执行爬虫程序
    :return:
    """
    # cmdline.execute('scrapy crawl douban_spider'.split())
    cmdline.execute('scrapy crawl douban_spider -o douban.json'.split())


if __name__ == '__main__':
    main()
